﻿using System.IO;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Logging;

namespace microsoft_TODO
{
  public class Program {
        public static void Main (string[] args) {
            BuildWebHost (args).Run ();
        }

        public static IWebHost BuildWebHost (string[] args) =>
            WebHost.CreateDefaultBuilder (args)
                .UseKestrel ()
                .UseContentRoot (Directory.GetCurrentDirectory ())
                .UseIISIntegration ()
                .ConfigureLogging((hostingContext, builder) => {
                    var configration = hostingContext.Configuration.GetSection("Logging");
                    builder.AddFile(configration);
                })
                .UseStartup<Startup> ()
                .Build ();
    }
}